package(
    default_visibility = ["//visibility:public"],
)

constraint_value(
    name = "erlang_git_master",
    constraint_setting = "@rules_erlang//platforms:erlang_major_version",
)

constraint_setting(
    name = "elixir_version",
)

constraint_value(
    name = "elixir_external",
    constraint_setting = ":elixir_version",
)

constraint_value(
    name = "elixir_1_10",
    constraint_setting = ":elixir_version",
)

constraint_value(
    name = "elixir_1_12",
    constraint_setting = ":elixir_version",
)

constraint_value(
    name = "elixir_1_13",
    constraint_setting = ":elixir_version",
)

platform(
    name = "erlang_external_platform",
    constraint_values = [
        "@rules_erlang//platforms:erlang_external",
        ":elixir_external",
    ],
    parents = ["@local_config_platform//:host"],
)

platform(
    name = "erlang_23_platform",
    constraint_values = [
        "@rules_erlang//platforms:erlang_23",
        ":elixir_1_10",
    ],
    parents = ["@rbe//config:platform"],
)

platform(
    name = "erlang_24_platform",
    constraint_values = [
        "@rules_erlang//platforms:erlang_24",
        ":elixir_1_12",
    ],
    parents = ["@rbe//config:platform"],
)

platform(
    name = "erlang_25_platform",
    constraint_values = [
        "@rules_erlang//platforms:erlang_25",
        ":elixir_1_13",
    ],
    parents = ["@rbe//config:platform"],
)

platform(
    name = "erlang_git_master_platform",
    constraint_values = [
        ":erlang_git_master",
        ":elixir_1_13",
    ],
    parents = ["@rbe//config:platform"],
)
